<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>新建/修改文件</title>
		<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
		<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="/static/web/css/admin.css">
		<link rel="stylesheet" href="/static/web/css/codemirror.css">
		<script src="/static/web/js/jquery.min.js"></script>
		<script src="/static/web/js/bootstrap.min.js"></script>
		<script src="/static/web/js/codemirror.js"></script>
		<script src="/static/web/js/mode/xml/xml.js"></script>
		<script src="/static/web/js/mode/javascript/javascript.js"></script>
		<script src="/static/web/js/mode/css/css.js"></script>
		<script src="/static/web/js/mode/php/php.js"></script>
		<script src="/static/web/js/mode/clike/clike.js"></script>
		<script src="/static/web/js/mode/htmlmixed/htmlmixed.js"></script>
		<script src="/static/web/js/admin.main.js"></script>
	</head>
	<body>
		<form method="POST" action="file_manage_control.php" name=form1 onSubmit="return Post();">
			<input type="hidden" name="fmdo" value="edit">
			<input type="hidden" name="backurl" value="{dede:global name='backurl' function='urlencode(@me)'/}">
			<input type="hidden" name="_csrf_token" value="{dede:global name='csrf_token'/}">
			<table class="table shadow-sm my-3">
				<tr>
					<td colspan="2">新建/修改文件</td>
				</tr>
				<tr>
					<td>工作目录</td>
					<td>
						<input name="activepath" value="{dede:global name='activepath'/}" class="admin-input-lg">
						<span>（空白表示根目录，不可以用小数点..表示路径）</span>
					</td>
				</tr>
				<tr>
					<td>文件名称</td>
					<td>
						<input name="filename" value="{dede:global name='filename'/}" class="admin-input-lg">
						<span>（不可以用小数点..表示路径）</span>
					</td>
				</tr>
				<tr>
					<td colspan="2" class="p-0">{dede:global name='contentView'/}</td>
				</tr>
				<tr>
					<td colspan="2" align="center">
						<button type="submit" name="B1" class="btn btn-success btn-sm">保存</button>
						<button type="button" name="B4" class="btn btn-outline-success btn-sm" onclick="location='file_manage_main.php?activepath=/static';">返回</button>
					</td>
				</tr>
			</table>
		</form>
		<script>
			function Post() {
				if (document.form1.filename.value == "") {
					ShowMsg("文件名不能为空");
					document.form1.filename.focus();
					return false;
				}
			}
			var editor = CodeMirror.fromTextArea(document.getElementById("str"), {
				lineNumbers: true,
				lineWrapping: true,
				mode: '{dede:global name='extension'/}',
			});
		</script>
	</body>
</html>